import request from "@/utils/request";


/**
 * 获取预付订单(填写订单)
 */
export const getPreOrderAPI = () => {
  return request({
    url: "/member/order/pre",
  });
};

export const createOrderAPI = (data) => {
  return request({
    url: '/member/order',
    method: 'post',
    data
  })
};

// 1. 封装API

/**
 * 获取订单详情
 */
export const geOrderDetailAPI = (id) => {
  return request({
    url: `/member/order/${id}`,
  });
};


/**
 * 支付-微信-小程序
 */
export const getPayWxPayMiniPay = (orderId) => {
  return request({
    url: `/pay/wxPay/miniPay`,
    data: { orderId },
  });
};